package model.micro
{
	
	/**
	 * A solid object which can be attacked.
	 */
	public class Attackable extends SolidObject
	{
		protected var effects:Vector.<Object>;
		
		/**
		 * Create a new attackable object.
		 * @param	x
		 * @param	y
		 * @param	width
		 * @param	height
		 */
		public function Attackable(x:Number, y:Number, width:Number, height:Number)
		{
			super(x, y, width, height);
			effects = new Vector.<Object>();
		}
		
		/**
		 * Called when attacked.
		 * @param	damage	the base number of hitpoints damaged
		 */
		public function attacked(damage:Number):void
		{
			//override this method
		}
		
		/**
		 * Apply an effect to this object.
		 * @param	effect
		 */
		public function applyEffect(effect:Object):void
		{
			effects.push(effect);
		}
	
	}

}